package com.openbravo.pos.printer;

public class ScrollAnimator extends BaseAnimator
{
  private int msglength;

  public ScrollAnimator(String paramString1, String paramString2)
  {
    this.msglength = Math.max(paramString1.length(), paramString2.length());
    this.baseLine1 = DeviceTicket.alignLeft(paramString1, this.msglength);
    this.baseLine2 = DeviceTicket.alignLeft(paramString2, this.msglength);
  }

  public void setTiming(int paramInt)
  {
    int i = paramInt / 2 % (this.msglength + 20);
    if (i < 20)
    {
      this.currentLine1 = DeviceTicket.alignLeft(DeviceTicket.getWhiteString(20 - i) + this.baseLine1, 20);
      this.currentLine2 = DeviceTicket.alignLeft(DeviceTicket.getWhiteString(20 - i) + this.baseLine2, 20);
    }
    else
    {
      this.currentLine1 = DeviceTicket.alignLeft(this.baseLine1.substring(i - 20), 20);
      this.currentLine2 = DeviceTicket.alignLeft(this.baseLine2.substring(i - 20), 20);
    }
  }
}

/* Location:           D:\PowerFulPOS-2.30.2\openbravopos.jar
 * Qualified Name:     com.openbravo.pos.printer.ScrollAnimator
 * JD-Core Version:    0.6.0
 */